﻿<!--
<copyright company="Christoph van der Fecht - VDsoft">
Copyright (C) Christoph van der Fecht - VDsoft - All Rights Reserved
Unauthorized copying of this file, via any medium is strictly prohibited,
unless it is communicated and authorized by the copyright owner.
</copyright>
-->
<UserControl x:Class="SeriesManager.Controls.ActorControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="380" 
			 Width="525"
			 MinHeight="380"
			 MinWidth="525"
			 DataContext="{Binding Source={StaticResource ResourceKey=Locator}, Path=ActorView}">
    <Grid>
		<ListView ItemsSource="{Binding Path=Actors, Mode=OneWay}"
				  Margin="2"
				  HorizontalAlignment="Stretch"
				  VerticalAlignment="Stretch">
			<ListView.ItemTemplate>
				<DataTemplate>
					<Grid
						Margin="5,0,0,5">
						<Grid.RowDefinitions>
							<RowDefinition Height="5*"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
						<Image Source="{Binding Path=ImagePath, Mode=OneWay}"
							   Margin="2"
							   Grid.Row="0"
							   Height="300"
							   HorizontalAlignment="Center"
							   VerticalAlignment="Center"
							   Stretch="Uniform"/>
						<StackPanel Orientation="Vertical"
									Grid.Row="1">
							<TextBlock Text="{Binding Path=Role, Mode=OneWay}"
									   Margin="0,2,0,2"
									   TextAlignment="Center"
									   FontSize="18"
									   FontWeight="Bold"/>
							<TextBlock Text="{Binding Path=Name}"
									   TextAlignment="Center"/>
						</StackPanel>
					</Grid>
				</DataTemplate>
			</ListView.ItemTemplate>
			<ListView.ItemsPanel>
				<ItemsPanelTemplate>
					<WrapPanel IsItemsHost="True"
							   Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"/>
				</ItemsPanelTemplate>
			</ListView.ItemsPanel>

		</ListView>
    </Grid>
</UserControl>
